
/**
 * fungsi pembuat submenu dari menu yang terakhir dituju
 */
void create_submenu(){
    glutAddMenuEntry("Spider", 0);
    glutAddMenuEntry("Robot", 1);
    glutAddMenuEntry("All", 2);
}

/**
 * definisi menu body
 * id :
 *  0 = Spider
 *  1 = Mokuton
 *  2 = Spider dan Mokuton
 */
void menu_body(int id){
    switch(id){
        case 0 : s_angle = 0; break;
        case 1 : m_angle = 0; break;
        case 2 : s_angle = m_angle = 0; break;
    }
}

/**
 * definisi menu head
 * id :
 *  0 = Spider
 *  1 = Mokuton
 *  2 = Spider dan Mokuton
 */
void menu_head(int id){
    switch(id){
        case 0 : s_angle = 1; break;
        case 1 : m_angle = 1; break;
        case 2 : s_angle = m_angle = 1; break;
    }
}

/**
 * definisi menu head 2
 * id :
 *  0 = Spider
 *  1 = Mokuton
 *  2 = Spider dan Mokuton
 */
void menu_head2(int id){
    switch(id){
        case 0 : s_angle = 2; break;
        case 1 : m_angle = 2; break;
        case 2 : s_angle = m_angle = 2; break;
    }
}

/**
 * definisi menu left upper arm
 * id :
 *  0 = Spider
 *  1 = Mokuton
 *  2 = Spider dan Mokuton
 */
void menu_left_upper_arm(int id){
    switch(id){
        case 0 : s_angle = 3; break;
        case 1 : m_angle = 3; break;
        case 2 : s_angle = m_angle = 3; break;
    }
}
/**
 * definisi menu left lower arm
 * id :
 *  0 = Spider
 *  1 = Mokuton
 *  2 = Spider dan Mokuton
 */
void menu_left_lower_arm(int id){
    switch(id){
        case 0 : s_angle = 4; break;
        case 1 : m_angle = 4; break;
        case 2 : s_angle = m_angle = 4; break;
    }
}
/**
 * definisi menu right upper arm
 * id :
 *  0 = Spider
 *  1 = Mokuton
 *  2 = Spider dan Mokuton
 */
void menu_right_upper_arm(int id){
    switch(id){
        case 0 : s_angle = 5; break;
        case 1 : m_angle = 5; break;
        case 2 : s_angle = m_angle = 5; break;
    }
}
/**
 * definisi menu right lower arm
 * id :
 *  0 = Spider
 *  1 = Mokuton
 *  2 = Spider dan Mokuton
 */
void menu_right_lower_arm(int id){
    switch(id){
        case 0 : s_angle = 6; break;
        case 1 : m_angle = 6; break;
        case 2 : s_angle = m_angle = 6; break;
    }
}

void menu_object(int id){
    switch(id){
        case 0 :
            OBJECT_MODE = OBJECT_WIREFRAME;
            break;

        case 1 :
            OBJECT_MODE = OBJECT_SHADING;
            break;
    }
    printf("status Object : %s", OBJECT_MODE == OBJECT_WIREFRAME ? "(Wireframe)" : "(Shading)");

}
